package education;

import java.util.Scanner;

public class SchoolApp {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		ScoreCalculator scalc=new ScoreCalculator();
		while(true) {
			System.out.println("input course name:");
			boolean exit= false;
			String name= "";
			while(true){
				name=sc.nextLine();
				if(!name.trim().equals(""))
					if(name.equals("exit"))
					{
						exit = true;
						break;
					}
					break;
			}
			if(exit)
				break;
			System.out.println("input course score:");
			int score = sc.nextInt();
			scalc.addCourseSctore(name,score);
		}
		scalc.total();
		scalc.average();
	}
}


